#!/usr/bin/python
import serial
import time


if __name__=='__main__':
    ser = serial.Serial('/dev/sweepbot', 115200, timeout=1)
    cmd = [0xff, 0xfe, 0x00, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0]
    ser.write(cmd)
    while True:
        print(time.time())
        result = ser.read(8)
        print('{} received message: {}'.format(time.time(), [hex(ord(x)) for x in result]))

